var vm = new Vue({
    el:'#login',
    data:{
        id:'',
        pwd:'',
    },
    methods:{
        login:function () {
            axios.post('/king/api/',{
                input_id:this.id,
                input_pwd:this.pwd
            }).then((response)=>{
                if(response.data.code==0){
                    alert(response.data.message)
                    window.location.href='/king/heros/'
                }else{
                    alert(response.data.message)
                    this.id=''
                    this.pwd=''
                }
            })
        },

    }

})